<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ taglib uri="/WEB-INF/tlds/att.tld" prefix="att"%>
<html>
<head>
	<meta name="decorator" content="moduleEdit" />
	<script type="text/javascript">
		//表单提交
		function formSubmit()
		{
			var path = $('#excelFile').val();
			var point_index=path.indexOf(".");
			var extName = path.substring(point_index+1, path.length);
			if(extName!='xls'){
				top.$.jBox.tip('请选择 格式为*.xls文件进行导入!','warning');
			}else{
				$("#save").attr("disabled","disabled");
				Oosp_Loading('正在导入，请稍等...');
				document.importForm.submit();
			}
		}
		$(function() {
			$("#save").removeAttr("disabled");
		});
	</script>
<style type="text/css">
h4{ border-bottom:1px dotted #ccc; padding-bottom:10px; margin:30px 0 15px; color:#b12028; font-size: 12px;}
</style>
</head>
<body>
<div class="Report_f">
           <div class="Report_f_1">
                <div class="Report_f_title_1">数据初始化</div>
                <ul class="nav nav-tabs Report_f_title_2">
                    <li><a href="#label_1" data-toggle="tab">历史数据</a></li>
                  </ul>
			<!-- Tab panes -->
			<div class="tab-content Report_f_title_3">
                  <div class="tab-pane active" id="label_1">
                         <div class="Report_f_title_4">
                  <form id="importForm" name="importForm" method="post"  action="${contextPath}/biz/contract/excel/importExcel"  enctype="multipart/form-data">
						<tags:message content="${message}"/>
						
									<input type="radio" id="dateType0" name="dateType" checked="checked" value="0"/>历史合同
									<input type="radio" id="dateType1" name="dateType" value="1"/>更新合同
									<input type="radio" id="dateType1" name="dateType" value="2"/>更新状态
									<input type="radio" id="dateType1" name="dateType" value="3"/>更新合同折上折
									<input type="radio" id="dateType1" name="dateType" value="4"/>更新合同品牌编码
						<div class="f_3">
		                      <div class="form-group col-xs-12">
								<label for="file" class="col-lb-1 control-label f_10">导入文件(*.xls):</label>
								<div class="col-sm-10 col-lb-2 f_6">
									<input type="file" size="40" name="excelFile" id="excelFile"/>
								</div>
							 </div>
						</div>
				   <div class="f_12">
				     <button type="button" class="btn btn-danger btn_5 btn_right" onclick="history.go(-1)">返&nbsp;回</button>
				     <shiro:hasPermission name="com.maoye.ossp.biz.contract.baseData:importpage">
				     	<button type="button" id="save" class="btn btn-success btn_5 btn_right" onclick="formSubmit();">导&nbsp;入</button>
				     </shiro:hasPermission>
				   </div>
			   </form>
			   		<h4>异常记录（文件名：${fileName}）：</h4>
					<table class="table table-striped table-hover o-l-table table-bordered" id="table1">
						<tbody>
							<c:forEach items="${msgList}" var="item" varStatus="var">
								<tr>
									<td>${item}</td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
                   </div>
              </div>
		  </div>
	</div>	
</div>
</body>
</html>